package com.lintrip.future;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class Host {

    private static final Logger logger = LoggerFactory.getLogger(Host.class);

    public Data request(final int count, final char c) {
        logger.info("Request({},{}) BEGIN",count,c);
        final FutureData futureData = new FutureData();
        new Thread() {
            @Override
            public void run() {
                RealData realData = new RealData(count,c);
                futureData.setRealData(realData);
            }
        }.start();
        logger.info("Request({},{}) END",count,c);
        return futureData;
    }
}
